<script setup lang="ts">
import { useMemberStore } from '@/stores'
import { http } from '@/utils/http'

//import {http} from '@/utils/http'
//import { http } from '@utils/http'
const memberStore = useMemberStore()
//测试请求
const getData = async () => {
  //console.log(http)
  const res = await http<string[]>({
    url: '',///home/banner
    method: 'GET',
  })
  console.log(res)
  // console.log("qingqiuchenggong":res)
  // uni.request({
  //   url: '/home/banner',
  //   method: 'GET',
  // })
}
</script>

<template>
  <view class="my">
    <view>会员信息：{{ memberStore.profile }}</view>
    <button @tap="
      memberStore.setProfile({
        nickname: '黑马先锋',
      })
      " size="mini" plain type="primary">
      保存用户信息
    </button>
    <button @tap="memberStore.clearProfile()" size="mini" plain type="warn">11清理用户信息</button>
    <button @tap="getData">测试请求</button>
  </view>
</template>

<style lang="scss">
//</style>
